Spatial Localization of a Transformer Robot Based on Ultrasonic Signal Wavelet Decomposition and PHAT-β-γ Generalized Cross Correlation

Because large oil-immersed transformers are enclosed by a metal shell, the on-site localization means it is difficult to achieve the accurate location of the patrol micro-robot inside a given transformer. To address this issue, a spatial ultrasonic localization method based on wavelet decomposition and PHAT-β-γ generalized cross correlation is proposed in this paper. The method is carried out with a five-element stereo ultrasonic array for the location of a transformer patrol robot. Firstly, the localization signal is decomposed into wavelet coefficients of different scales, which would realize the adaptive decomposition of the frequency of the localization signal from low frequencies to high frequencies. Then, the wavelet coefficients are denoised and reconstructed by using the semi-soft threshold function. Second, a modified phase transform-beta-gamma (PHAT-β-γ) method is used to calculate the exact time delay between different sensors by increasing the weights of the PHAT weighting function and introducing a correlation function. Finally, by using the proposed method, the accurate localization of the transformer patrol micro-robot is achieved with a five-element stereo ultrasonic array. The simulation and test results show that inside a transformer experimental oil tank (120 cm × 100 cm × 100 cm, L × W × H), the relative error of transformer patrol micro-robot spatial localization is within 4.1%, and the maximum localization error is less than 3 cm, which meets the requirement of engineering localization.


Introduction
The metal-enclosed nature of large transformers results in poor internal visibility.Without dismantling a large transformer, it is difficult to effectively visualize the internal insulation condition of a large transformer by only analyzing the dissolved gases in the oil (e.g., triple-ratio method, modified triple-ratio method, etc.).The finding of defects and faults inside oil-immersed transformers has been a difficult problem for substation maintenance due to the poor internal visibility caused by the metal sealing of oil-immersed transformers [1][2][3].In order to accurately detect the internal defects of the transformer, the inspection is usually carried out by manually drilling into the transformer or lifting the cover [4,5].But the method has three major problems: low efficiency, poor accuracy, and high risk.
With advances in artificial intelligence and micro-robotic technology, a micro-robot is developed for the patrol and inspection of transformer interiors, which allows for the more intuitive and faster analysis and localization of transformer faults.In 2018, ABB launched its first oil-immersed transformer internal patrol robot named Txplore [6,7].Txplore is rectangular in shape and 18 × 20 × 24 cm in size, and it contains four propellers and multiple cameras.For the four propellers fixed on the shell of the robot, two in the horizontal direction drive the forward and steering of the robot, and the other two in the vertical direction control the upward and downward movement.Meanwhile, Shenyang Ligong University and Shenyang Institute of Automation of the Chinese Academy of Sciences have developed a similar spherical transformer robot named SSTIR with a diameter of 19 cm, with reference to the structure of underwater robots [8][9][10].Referring to underwater vehicles, we have designed a new type of transformer patrol robot with fish fins [11,12].The robot fish has a similar spherical structure, with two micro-propellers and a visual camera.Unlike the two robots above, our robot fish additionally has one swim bladder and four fins.The swim bladder is installed below the fish body and can accurately control the amount of oil absorbed or expelled, aiming to control the speed of uplift and downlift.For the four fins, each two are mounted on the upper and lower end of the fish body, respectively, which can control the deflection angle of the fish.With the help of the swim bladder and fins, the robot fish can glide even without power, effectively reducing power consumption and increasing operating hours.
When patrolling inside the transformer, the micro-robot is faced with a challenge: there are many equipment components inside the transformer, meaning the micro-robot passage is narrow.The micro-robot would easily dash against and damage internal equipment components.Therefore, how to accurately locate the spatial position of the micro-robot is the key to ensuring that the micro-robot smoothly avoids obstacles and accurately reaches the target point for defect detection.Since the transformer is completely sealed by a metal casing, the inside of the transformer is dark and filled with transformer oil, and it is difficult to use conventional methods such as LIDAR, vision cameras, and GPS to locate the microrobot [13][14][15][16][17]. Considering that the ultrasonic localization method has the characteristics of no need for light, a high localization accuracy, and a wide detection range in transformer oil, it is an effective and feasible method for locating a micro-robot.
An important factor affecting the accuracy of ultrasonic localization is the time delay estimation of an ultrasonic signal.The commonly used methods for time delay estimation include: the rising-edge triggering method, the threshold triggering method, basic cross correlation, generalized cross correlation, adaptive filtering, a neural network, deep learning, and so on [18][19][20][21][22].Among them, the rising-edge trigger method and threshold trigger method are the least computationally intensive methods for time delay estimation, which are generally applicable to the occasions where the waveform profile is clear and has no distortion or small distortion.The basic cross correlation method achieves time delay estimation by peak detection of the correlation function, which has the advantages of fast operation, good robustness, and a certain degree of waveform distortion tolerance.It is the most widely applicable method for time delay estimation at present.However, with the increase in noise components and the deterioration of waveform quality in modern detection fields, the adaptation range of the basic cross correlation method is limited.In order to improve the performance of time delay estimation, Knapp and Carter et al. [23] proposed a generalized cross correlation algorithm, which can serve to sharpen the cross correlation function curve and improve the performance of time delay estimation by prewhitening the signal.The commonly used generalized cross correlation algorithms include Roth, PHAT, SCOT, HB, and maximum likelihood estimation [12].
Although generalized cross correlation algorithms can improve the performance of delay estimation to a certain extent, these methods are often designed for specific application scenarios and signal characteristics.The computational parameters used in these methods are often fixed and cannot be adjusted according to the signal changes.Adaptive filtering, neural networks, and deep learning methods can theoretically obtain more accurate performances in time delay estimation by iterative computation and learning the signal, but they suffer from the problem of large computation and are currently difficult to be applied in the field of real-time localization.Considering the complex variation of the ultrasonic localization signal and the demand for the three-dimensional real-time localization of a micro-robot, the above methods are not yet able to solve the spatial localization problem of a patrol micro-robot inside a power transformer.
Therefore, for the problems of strong electromagnetic interference and complex noise inside power transformers, the paper proposes a delay estimation algorithm based on ultrasonic signal wavelet decomposition and PHAT-β-γ generalized cross correlation, which would achieve the spatial localization of a transformer patrol micro-robot using a five-element stereo ultrasonic array.The wavelet transform of any signal x(t) is defined as the inner product of the signal and the wavelet basis function, i.e.,

Micro-Robot Localization
where W x (a, τ) is the wavelet coefficient; ψ aτ (t) is the wavelet basis function; a is the scale factor; τ is the translation parameter, whose value can be positive or negative; and * denotes the complex conjugate.The wavelet transform obtains the frequency characteristics of an ultrasound signal by scaling the width of the wavelet basis function and the time information of the signal by translating the wavelet basis function.The wavelet coefficients obtained by wavelet transform represent the correlation degree between wavelets and ultrasound signals, and the calculation process of wavelet coefficients is shown in Figure 1.The wavelet transform only decomposes the low-frequency components of the signal, so it can characterize the signal well when most of the key components in the signal are low-frequency components but cannot well characterize and decompose the signal with a large number of high-frequency components.As an extension of wavelet transform, wavelet packet transform provides a more flexible decomposition method for addressing this problem.Since it can decompose both low-frequency components and high-frequency components, wavelet packet transform can achieve better time-frequency localization analysis for signals with a large number of medium-and high-frequency components.
The fast algorithm for wavelet packets is divided into two parts: decomposition and reconstruction.The schematic diagram of the three-layer decomposition of wavelet packets is shown in Figure 2.  The three-layer wavelet packet decomposition of signal s is to decompose both the low-frequency and high-frequency components of the signal to the next layer and then continue the decomposition, which improves the time-frequency resolution of signal pro cessing.The ordering of the individual frequency bands after decomposition is an im portant issue in wavelet packet decomposition.Take the three-layer wavelet packet de composition as an example; the decomposition law is: if (m, n) denotes the mth layer and the nth decomposition node, the low-frequency and high-frequency parts generated by each decomposition are denoted by a and d, respectively.If the last bit of the node is a the decomposed low-frequency part is on the left side and the high-frequency part is on the right side; if the last bit of the node is d, the opposite is true.
The essence of wavelet packet threshold denoising is the process of suppressing the useless part of the signal and enhancing the useful part.The wavelet packet threshold denoising process is: (a) the decomposition process, i.e., a wavelet is selected to perform n-layer wavelet decomposition on the signal; (b) the thresholding process, i.e., the coeffi cients of each layer of the decomposition are denoised according to the threshold values The three-layer wavelet packet decomposition of signal s is to decompose both the lowfrequency and high-frequency components of the signal to the next layer and then continue the decomposition, which improves the time-frequency resolution of signal processing.The ordering of the individual frequency bands after decomposition is an important issue in wavelet packet decomposition.Take the three-layer wavelet packet decomposition as an example; the decomposition law is: if (m, n) denotes the mth layer and the nth decomposition node, the low-frequency and high-frequency parts generated by each decomposition are denoted by a and d, respectively.If the last bit of the node is a, the decomposed low-frequency part is on the left side and the high-frequency part is on the right side; if the last bit of the node is d, the opposite is true.
The essence of wavelet packet threshold denoising is the process of suppressing the useless part of the signal and enhancing the useful part.The wavelet packet threshold denoising process is: (a) the decomposition process, i.e., a wavelet is selected to perform n-layer wavelet decomposition on the signal; (b) the thresholding process, i.e., the coefficients of each layer of the decomposition are denoised according to the threshold values; (c) the reconstruction process, i.e., the denoised wavelet coefficients are wavelet-reconstructed to obtain the denoised signal.In the process of wavelet packet thresholding denoising, it is crucial to choose the appropriate wavelet basis and threshold function.Currently, the widely used threshold functions are the hard threshold function and soft threshold function.
The hard threshold function is expressed as where the wavelet coefficient remains constant when the absolute value of the wavelet coefficient is greater than a given threshold and zero when it is less than the threshold.Hard thresholding functions can preserve the local features of the signal relatively better.
Sensors 2024, 24, 1440 5 of 23 The soft threshold function is expressed as where sgn() is the sign function.When the absolute value of the wavelet coefficient is greater than the given threshold, the wavelet coefficient is subtracted from the threshold; when it is less than the threshold, the wavelet coefficient is equal to zero.The signal processed by the soft threshold function will be smoother.
The hard threshold function is discontinuous at −λ and λ, causing the reconstructed signal to oscillate around −λ and λ, which does not have the smoothness of the original signal.The wavelet coefficients obtained by the soft threshold function have better continuity but will compress the signal and affect the approximation of the reconstructed signal to the real signal.To this end, a semi-soft threshold function is constructed by combining the advantages and disadvantages of soft and hard threshold functions.
where sgn() is the sign function, λ 1 is the lower threshold of the threshold function, and λ 2 is the upper threshold of the threshold function and is set to The semi-soft thresholding function zeroes out the wavelet coefficients smaller than the lower threshold and keeps the wavelet coefficients larger than the upper threshold.The wavelet coefficient function transform between the upper and lower thresholds solves the continuity problem of hard thresholding and the compression problem of soft thresholding.
In addition to the selection of a suitable threshold function, wavelet packet thresholding noise reduction also requires the determination of a threshold value.The threshold thr used in this paper is calculated as follows.
where σ is the standard deviation of the noise in the signal (mean squared deviation), and N is the length of the signal, λ 1 = 0.75thr.

Optimization of the Ultrasonic Signal Time Delay Estimation Algorithm for the Micro-Robot
Assuming that the ultrasound signal emitted by the micro-robot is s(t), the ultrasound signal is affected by attenuation, time delay, noise, and other factors during propagation.Therefore, the signals received by the ultrasound receiving sensor 1 and receiving sensor 2 can be expressed as where a 1 and a 2 are the attenuation coefficients of the acoustic waves, n 1 (t) and n 2 (t) are the white noise, and τ 1 and τ 2 denote the time needed for the acoustic waves to propagate to the ultrasound receiving transducers 1 and 2, respectively.Then, τ 12 = τ 1 − τ 2 is the time difference between the ultrasound signals arriving at the two transducers.
Based on the theory of the propagation of ultrasonic signals in transformer oil, the cross correlation time delay estimation model for multi-channel ultrasonic sensors is shown below.
Substituting Equation (7) into Equation (8) yields Sensors 2024, 24, 1440 6 of 23 where R ss (τ − τ 12 ) is the correlation function between the effective signals (i.e., the signal of attenuation and delay), R sn 2 (τ − τ 1 ) and R sn 1 (−τ − τ 2 ) is the correlation function between the effective signal and the noise, and R n 1 n 2 (τ) is the correlation function between the noises.In general, the signal and the noise and the noise and the noise are all weakly correlated or uncorrelated, i.e., Therefore, the correlation function can be abbreviated as According to the properties of the self-correlated function R ss (τ − τ 12 ) in Equation ( 11), the maximum value of According to the Wiener-Sinchin theorem, the cross correlation function and its crosspower spectral density are Fourier transform pairs.Then, the correlation functions of x 1 (t) and x 2 (t) can be further expressed as where G x 1 x 2 (ω) is the cross-power density spectrum between the signals x 1 (t) and x 2 (t) acquired by the ultrasound transducer, and R x 1 x 2 (τ) is the horizontal coordinate at the corresponding maximum peak, which is also the required time delay estimate.
In the actual time-delay estimation process, the noises in the signal are often not completely independent of each other due to the limited length of the signal collected by the ultrasonic receiver transducer, and the signal will also contain the ultrasonic echo component.In the case of a relatively low signal-to-noise ratio, it will cause the peaks of the correlation function to become obscure or even pseudo-peak, which greatly reduces the accuracy of the time delay estimation.
To address the above problem, a common method is to weight the power spectrum in Equation ( 12) and use the frequency domain weighting function to filter the signal, sharpen the correlation, and improve the accuracy of the time delay estimation.This results in the generalized intercorrelation function.
where Ψ(ω) is the weighting function.The weighting function of PHAT GCC is where Gx 1 x 2 (ω) is the cross-power spectral density of signal x 1 and signal x 2 .
At low signal-to-noise ratios, the PHAT-based weighting function has better performances under the same conditions.However, as the signal-to-noise ratio decreases further, its time delay estimation accuracy also decreases.For this reason, the PHAT weighting function is improved in this paper by increasing the weights, and its expression is where β is an exponential adjustment factor in the range of [0,1].When the signal energy is small, the denominator term of the weighting function tends to 0, while the overall weighting function tends to infinity, which will result in a large error.For this reason, a non-zero factor needs to be added to the denominator of the weighting function, and the mode-squared coherence function |γ| 2 is chosen as the non-zero factor in this paper.
where γ = . In the actual system, the signals received by the two sensor arrays are neither perfectly coherent nor perfectly incoherent, so 0 < γ 2 (ω) < 1.

Localization Method of a Micro-Robot in a Power Tranformer
The ultrasonic sensor array consists of five omnidirectional waterproof piezoelectric ceramic ultrasonic probes, four of which are arranged in a quadrilateral on a plane, and another ultrasonic probe is directly above the intersection of the diagonals of the quadrilateral, forming a quadrilateral cone, as shown in Figure 3.The five ultrasonic probe coordinates are U 1 (0, 0, h), U 2 (b, b, 0), U 3 (−b, b, 0), U 4 (−b, −b, 0), and U 5 (b, −b, 0), respectively.Assuming that the coordinate position of the ultrasonic source on the body of the micro-robot is T0(xf, yf, zf), based on the principle that the sound waves propagate in the material along the path of minimum energy attenuation, and based on the five-element ultrasonic array configuration in Figure 3, the distance from the micro-robot to the ultrasonic probe can be obtained by the product of the sound velocity and the time delay, as shown in Equation ( 17).
where ti is the moment when the sensor Ui receives the signal from the sound source, and Vc is the speed of the sound wave in the oil.
The analytical solution of the three-dimensional coordinate position of the sound source of the patrolling micro-robot, calculated by Equation ( 17), is shown as follows.Assuming that the coordinate position of the ultrasonic source on the body of the micro-robot is T 0 (x f , y f , z f ), based on the principle that the sound waves propagate in the material along the path of minimum energy attenuation, and based on the five-element ultrasonic array configuration in Figure 3, the distance from the micro-robot to the ultrasonic probe can be obtained by the product of the sound velocity and the time delay, as shown in Equation (17).
where t i is the moment when the sensor U i receives the signal from the sound source, and V c is the speed of the sound wave in the oil.
Sensors 2024, 24, 1440 8 of 23 The analytical solution of the three-dimensional coordinate position of the sound source of the patrolling micro-robot, calculated by Equation (17), is shown as follows.
The parameters in the formula are as follows:

Ultrasonic Signal Characteristics
Simulation work was carried out to verify the performance of the method.The emitted ultrasonic signal consists of three sinusoidal signals with a frequency of 180 kHz, and the noise signal is Gaussian white noise.The sampling frequency is 2.5 MSa/s, and the number of sampling points is 4000.To simulate the effect of noise on the signal, Gaussian white noise with SNR = −10 dB was added to the signal, as shown in Figure 4. ()

Ultrasonic Signal Characteristics
Simulation work was carried out to verify the performance of the method.The emitted ultrasonic signal consists of three sinusoidal signals with a frequency of 180 kHz, and the noise signal is Gaussian white noise.The sampling frequency is 2.5 MSa/s, and the number of sampling points is 4000.To simulate the effect of noise on the signal, Gaussian white noise with SNR = −10 dB was added to the signal, as shown in Figure 4.The spectrum of the ultrasonic signal is shown in Figure 5.The frequency range of this signal is 160-200 kHz, there are differences in the propagation path of the sound source to the three transducers, and the degree of attenuation is not consistent during the propagation.There is a difference in the frequency band range of the ultrasonic signal received by each sensor.The spectrum of the ultrasonic signal is shown in Figure 5.The frequency range of this signal is 160-200 kHz, there are differences in the propagation path of the sound source to the three transducers, and the degree of attenuation is not consistent during the propagation.There is a difference in the frequency band range of the ultrasonic signal received by each sensor.
Figure a3i indicates the third layer, the i-th wavelet packet decomposition node, and it can be seen from the figure that the wavelet coefficients at the a30 and a31 decomposition nodes contain a larger useful signal component, and the other decomposition nodes contain a smaller useful signal component.For each wavelet coefficient, the threshold is first estimated using the universal thresholding (sqtwolog principle) method, and then each wavelet coefficient is denoised using the hard thresholding function, soft thresholding function, and semi-soft thresholding function, respectively; then, the denoised wavelet coefficients are reconstructed.The reconstructed signal is shown in Figure 7.The ultrasonic signal with noise is decomposed into three wavelet packets, decomposed wavelet coefficients are shown in Figure 6.The ultrasonic signal with noise is decomposed into three wavelet packets, and the decomposed wavelet coefficients are shown in Figure 6.The ultrasonic signal with noise is decomposed into three wavelet packets, and the decomposed wavelet coefficients are shown in Figure 6. Figure a3i indicates the third layer, the i-th wavelet packet decomposition node, and it can be seen from the figure that the wavelet coefficients at the a30 and a31 decomposi tion nodes contain a larger useful signal component, and the other decomposition nodes contain a smaller useful signal component.For each wavelet coefficient, the threshold is first estimated using the universal thresholding (sqtwolog principle) method, and then each wavelet coefficient is denoised using the hard thresholding function, soft threshold ing function, and semi-soft thresholding function, respectively; then, the denoised wavele  In order to effectively evaluate the noise reduction ability of the wavelet denoising algorithm with the semi-soft threshold function and the traditional wavelet threshold denoising algorithm for signals in this paper, the signal-to-noise ratio (SNR), root mean square error (RMSE), and waveform similarity coefficient (NCC) are used as evaluation indices to determine the superiority of the noise reduction effect of ultrasonic signals, where the SNR is defined as The RMSE is defined as In order to effectively evaluate the noise reduction ability of the wavelet denoising algorithm with the semi-soft threshold function and the traditional wavelet threshold denoising algorithm for signals in this paper, the signal-to-noise ratio (SNR), root mean square error (RMSE), and waveform similarity coefficient (NCC) are used as evaluation indices to determine the superiority of the noise reduction effect of ultrasonic signals, where the SNR is defined as The RMSE is defined as Sensors 2024, 24, 1440 11 of 23 The NCC is defined as where x(i) denotes the original signal and x(i) denotes the denoised signal.
The calculated results of the signal noise reduction indexes SNR, RMSE, and NCC for different denoising methods are shown in Table 1.The larger the value of SNR, the smaller the proportion of noise in the signal and the better the denoising effect; the smaller the RMSE, the smaller the distortion of the signal; and the closer the NCC value is to 1, the better the denoising effect of the simulated signal.As can be seen in Table 1, compared with the traditional threshold functions, the semi-soft threshold function has the largest value of SNR, the smallest RMSE, and the closest NCC value to 1.It shows that this semi-soft threshold function has a better denoising effect on signal denoising.

Time Delay Estimation
The arrival time of the sine signal in signal 1 is the 300th sample point, and the arrival time of the sine signal in signal 2 is the 500th sample point.Therefore, the delay time of the two signals is 200 samples.Figures 8 and 9 show the TDE results for the basic intercorrelation, the PHAT-β generalized intercorrelation, and the PHAT-β-γ generalized intercorrelation, respectively.

Test Platform for Patrol Micro-Robot 3D Spatial Localization
In order to verify the practicability of the three-dimensional positioning method proposed in this paper, an experimental test platform is built in this paper.The test platform mainly includes five parts: the transformer inspection robot, ultrasonic positioning array, and data acquisition and processing platform.The test platform is shown in Figure 10.A comprehensive comparison of Figure 8 shows that the TDE performance gradually becomes better as the exponential regulator β increases in the range of [0, 0.8].The best results are obtained when the exponential regulator β is 0.6 and 0.8.When the exponential regulator β is larger than 0.8, the TDE results become worse.Therefore, it is necessary to select the optimal exponential regulator according to the signal characteristics and noise conditions in practical applications.According to the signal and noise characteristics set in the simulation, the optimal value of the exponential regulator β is 0.8.Meanwhile, it can be seen from Figure 9 that when the signal energy is small, the TDE performance can be effectively improved by adding a non-zero factor to the denominator of the weighting function.

Test Platform for Patrol Micro-Robot 3D Spatial Localization
In order to verify the practicability of the three-dimensional positioning method proposed in this paper, an experimental test platform is built in this paper.The test platform mainly includes five parts: the transformer inspection robot, ultrasonic positioning array, and data acquisition and processing platform.The test platform is shown in Figure 10.
The overall structure of the patrol micro-robot is shown in Figure 11.The patrol microrobot mainly includes the: #1-robot main body shell, #2-ultrasonic emission sensor, #3vision device, #4-infrared range module, #5-robot vertical propeller propulsion device, #6-robot horizontal propeller propulsion device, #7-pressure sensor, and robot control system, etc.The main body of the patrol micro-robot is a spherical sealed structure, and an ultrasonic emission sensor is installed on the top of the main body of the patrol micro-robot, which emits ultrasonic signals at regular intervals, is received by the ultrasonic array installed at the tank, and is mainly used for the three-dimensional localization of the patrol micro-robot.There are two infrared distance measurement modules installed in the front of the main body of the patrol micro-robot, which can be used to measure the distance of surrounding obstacles; there are four vertical propeller propulsion devices installed around the middle of the main body of the patrol micro-robot, through which the vertical propeller propulsion devices can control the floating; and there are two horizontal propeller propulsion devices installed in the middle and lower part of the main body of the patrol micro-robot, through which the horizontal propeller propulsion devices can control the forward and turning of the patrol micro-robot; there is a depth pressure sensor installed in the bottom of the main body of the patrol micro-robot, which can be used to measure the diving depth.There is the robot control system inside the main body of the patrol micro-robot, which mainly includes the motor drive and control module, sensor acquisition module, position detection module, wireless transmission module, power supply module, etc.The overall structure of the patrol micro-robot is shown in Figure 11.The patrol m cro-robot mainly includes the: #1-robot main body shell, #2-ultrasonic emission senso #3-vision device, #4-infrared range module, #5-robot vertical propeller propulsion d vice, #6-robot horizontal propeller propulsion device, #7-pressure sensor, and rob control system, etc.The main body of the patrol micro-robot is a spherical sealed structur and an ultrasonic emission sensor is installed on the top of the main body of the patr micro-robot, which emits ultrasonic signals at regular intervals, is received by the ultr sonic array installed at the tank, and is mainly used for the three-dimensional localizatio of the patrol micro-robot.There are two infrared distance measurement modules installe in the front of the main body of the patrol micro-robot, which can be used to measure t distance of surrounding obstacles; there are four vertical propeller propulsion devices i stalled around the middle of the main body of the patrol micro-robot, through which t vertical propeller propulsion devices can control the floating; and there are two horizont propeller propulsion devices installed in the middle and lower part of the main body the patrol micro-robot, through which the horizontal propeller propulsion devices ca control the forward and turning of the patrol micro-robot; there is a depth pressure sens installed in the bottom of the main body of the patrol micro-robot, which can be used measure the diving depth.There is the robot control system inside the main body of t patrol micro-robot, which mainly includes the motor drive and control module, sens The robot is spherical, with a diameter (TR1) of 123 mm.The total height (TH) of the transformer patrol robot is 130 mm, the total width (TW) of the robot is 127 mm, and the maximum diameter (TR2) is 139 mm.
There is an ultrasonic emission sensor installed on the top of the main body of the patrol micro-robot, which emits ultrasonic signals at regular intervals and is received by the ultrasonic array, which consists of five omnidirectional waterproof piezoelectric ceramic ultrasonic probes, four of which are arranged in a quadrilateral on a plane, and the other ultrasonic probe is directly above the intersection of the diagonals of the quadrilateral, forming a quadrilateral cone, which has a nominal.The ultrasonic localization transducer array is shown in Figure 12.The ultrasonic probe has a diameter of 12.7 mm, an operating frequency of 160~200 kHz, a resonance frequency of 180 kHz, a transducer vertical directivity of −90~90 • , and a transducer horizontal directivity of 0~360 • .The coordinates of the five ultrasonic probes are U1 (0 mm, 0 mm, 110 mm), U2 (110 mm, 110 mm, 0 mm), U3 (−110 mm, 110 mm, 0 mm), U4 (−110 mm, −110 mm, 0 mm), and U5 (110 mm, −110 mm, 0 mm), respectively.The robot is spherical, with a diameter (TR1) of 123 mm.The total height (TH) of transformer patrol robot is 130 mm, the total width (TW) of the robot is 127 mm, and maximum diameter (TR2) is 139 mm.
There is an ultrasonic emission sensor installed on the top of the main body of

Experiment and Data Acquisition Process
In the experiment, the patrol micro-robot was moved to position 1 (−2 690 mm), at which time the ultrasonic transducer on top of the patrol micro a set of ultrasonic signals with three consecutive sinusoidal signals at a fre kHz every 500 ms.At the same time, the ultrasonic signals were received by array, and the data were synchronously acquired by the data acquisition d rameters of the data acquisition device are set as follows: the sampling rate o is 2.5 MSa/s, the acquisition depth is 4096 points, and the triggering method triggering.The ultrasonic signals collected by the acquisition device are sh 13.

Experiment and Data Acquisition Process
In the experiment, the patrol micro-robot was moved to position 1 (−220 mm, 0 mm, 690 mm), at which time the ultrasonic transducer on top of the patrol micro-robot emitted a set of ultrasonic signals with three consecutive sinusoidal signals at a frequency of 180 kHz every 500 ms.At the same time, the ultrasonic signals were received by the ultrasonic array, and the data were synchronously acquired by the data acquisition device.The parameters of the data acquisition device are set as follows: the sampling rate of each channel is 2.5 MSa/s, the acquisition depth is 4096 points, and the triggering method is rising edge triggering.The ultrasonic signals collected by the acquisition device are shown in Figure 13.
The five time-domain waveforms in Figure 13 are the ultrasonic signals collected by sensor U1, sensor U2, sensor U3, sensor U4, and sensor U5, respectively.The ultrasonic signal contains system noise, which mainly includes: mechanical equipment vibration, electromagnetic noise, and environmental white noise.The middle part of the received waveform is the ultrasonic signal, which can be seen from the contour as three sine signals emitted, but the amplitude of the sine signal changes during propagation, and the signal contains large noise, making it difficult to obtain the first wave position of the signal accurately.The ultrasonic-shaped signals obtained from the five sensors were decomposed into three wavelet packets.Taking the ultrasonic-shaped signal from sensor U5 as an example, the wavelet coefficients after the decomposition are shown in Figure 14.
The wavelet coefficients at the a30 and a31 decomposition nodes in the Figure 14 contain a larger useful signal component, and the other decomposition nodes contain a smaller useful signal component.The wavelet coefficients are first denoised using the general thresholding method; then, each wavelet coefficient is denoised using the semi-soft thresholding function; and finally, the denoised wavelet coefficients are re-constructed, and the reconstructed ultrasonic waveform signal is shown in Figure 15.The five time-domain waveforms in Figure 13 are the ultrasonic signals c sensor U1, sensor U2, sensor U3, sensor U4, and sensor U5, respectively.Th signal contains system noise, which mainly includes: mechanical equipmen electromagnetic noise, and environmental white noise.The middle part of t    From the repeated localization results of the patrol micro-robot at position 1 in Table 2, we can see that the maximum X-axis localization error of the 3D spatial localization method of the patrol micro-robot at sound source position 1 is 12 mm, and the average Xaxis localization error is 5 mm; the maximum Y-axis localization error at sound source position 1 is 7 mm, and the average Y-axis localization error is 1.8 mm; the maximum Zaxis localization error at sound source position 1 is 27 mm, and the average Z-axis localization error is 14.7 mm; the maximum relative localization error of the micro-robot patrolling inside the transformer at location 1 is 4.1%, and the average relative localization error is 2.28%.As can be seen in Figure 16, there are multiple peaks in the curves obtained using the basic cross correlation (BCC) algorithm, and the magnitudes of the maximum peaks are close to each other, as shown in the left panels of Figure 16a,b,d.Such peaks of similar magnitudes will increase the error of the time delay estimation to some extent.Compared with the results of the basic correlation, the GCC used in the paper has the effect of sharpening the peaks, and the peaks of the curves obtained are more obvious; thus, the delay estimates can be obtained more accurately.From the results obtained using the generalized cross correlation algorithm in Figure 16a-d, it can be determined that the estimated time delay between sensor 2 and sensor 1 is ∆t21 = 58.4µs, the estimated time delay between sensor 3 and sensor 1 is ∆t31 = 114 µs, the estimated time delay between sensor 4 and sensor 1 is ∆t41 = 114 µs, and the estimated time delay between sensor 5 and sensor 1 is ∆t51 = 114 µs.
To verify the effectiveness of the proposed wavelet decomposition and PHAT-β-γ generalized cross correlation algorithm based on the ultrasonic signal when the sound source of the patrol micro-robot is at different positions, the micro-robot is moved from the original position 1 (−220 mm, 0 mm, 690 mm) to position 2 (0 mm, 0 mm, 690 mm) and position 3 (220 mm, 0 mm, 690 mm).The ultrasonic signals were repeatedly acquired 10 times at different positions, and the time delay estimates were obtained by wavelet packet denoising and the generalized correlation algorithm.Finally, the spatial position of the micro-robot was estimated based on the five-element ultrasonic array localization method.
From the repeated localization results of the patrol micro-robot at position 1 in Table 2, we can see that the maximum X-axis localization error of the 3D spatial localization method of the patrol micro-robot at sound source position 1 is 12 mm, and the average X-axis localization error is 5 mm; the maximum Y-axis localization error at sound source position 1 is 7 mm, and the average Y-axis localization error is 1.8 mm; the maximum Z-axis localization error at sound source position 1 is 27 mm, and the average Z-axis localization error is 14.7 mm; the maximum relative localization error of the micro-robot patrolling inside the transformer at location 1 is 4.1%, and the average relative localization error is 2.28%.From the repeated localization results of the patrol micro-robot at position 2 in Table 3, we can see that the maximum X-axis localization error of the 3D spatial localization method of the patrol micro-robot at sound source position 2 is 14 mm, and the average X-axis localization error is 11 mm; the maximum Y-axis localization error at sound source position 2 is 13 mm, and the average Y-axis localization error is 7.3 mm; the maximum Z-axis localization error at sound source position 2 is 23 mm, and the average Z-axis localization error is 10.9 mm; the maximum relative localization error of the micro-robotic patrolling inside the transformer at location 2 is 3.53%, and the average relative localization error is 2.72%.
From the repeated localization results of the patrol micro-robot at position 3 in Table 4, we can see that the maximum X-axis localization error of the 3D spatial localization method of the patrol micro-robot at sound source position 3 is 9 mm, and the average X-axis localization error is 3.5 mm; the maximum Y-axis localization error at sound source position 3 is 3 mm, and the average Y-axis localization error is 1.1 mm; the maximum Z-axis localization error at sound source position 3 is 28 mm, and the average Z-axis localization error is 16 mm; the maximum relative localization error of the micro-robot patrolling inside the transformer at location 3 is 3.94%, and the average relative localization error is 2.38%.The above experimental results verify the effectiveness of the proposed micro-robot spatial localization method based on ultrasonic signal wavelet decomposition and PHATβ-γ generalized cross correlation and a five-element stereo ultrasonic array at different locations.The localization results show that the 3D spatial relative localization error of the micro-robot is within 4.1%, and the maximum localization error is less than 3 cm, which meets the engineering application of the current patrol micro-robot.

Conclusions
In this paper, a new method for the spatial localization of a transformer micro-robot based on ultrasonic signal wavelet decomposition, a PHAT-β-γ generalized cross correlation algorithm, and five-element stereo ultrasonic array localization is proposed.In order to verify the performance of the method, simulation work is carried out.The simulation results show that: the ultrasonic localization simulation signal is significantly improved by using the wavelet packet decomposition and semi-soft threshold function denoising reconstruction proposed in this paper, and the signal-to-noise ratio of the ultrasonic signal is significantly improved; the TDE performance gradually becomes better as the exponential regulator β increases in the PHAT-β-γ generalized cross correlation algorithm; when the exponential regulator β is 0.6 and 0.8, the best results are obtained, and the time delay estimation results become gradually worse after the exponential regulator β exceeds 0.8; when the signal energy is small, the TDE performance can be effectively improved by adding a non-zero factor to the denominator of the weighting function.
Based on the simulation verification, this paper builds an experimental test platform for validating the three-dimensional spatial localization effect of micro-robot patrolling inside the transformer and verifies the effectiveness of the spatial localization method proposed in this Method Based on the Optimization of Ultrasonic Time Delay Estimation 2.1.Ultrasonic Signal Decomposition and Reconstruction Based on Wavelet Transform Wavelet transform (WT) is a powerful signal processing tool developed in recent years, which can represent the local characteristics of signals in both time and frequency domains and is a suitable method for dealing with signals with transient and abrupt characteristics.

Figure 2 .
Figure 2. Three-layer wavelet packet decomposition process of an ultrasonic signal.S is the original signal, and a10-a37 are the wavelet coefficients.

Figure 2 .
Figure 2. Three-layer wavelet packet decomposition process of an ultrasonic signal.S is the original signal, and a10-a37 are the wavelet coefficients.

Figure 4 .
Figure 4. Simulated signal with a signal-to-noise ratio of −10dB.

Figure 4 .
Figure 4. Simulated signal with a signal-to-noise ratio of −10 dB.

Figure 6 .
Figure 6.Wavelet packet decomposition feature map of simulated signal 1.

Figure
Figurea3iindicates the third layer, the i-th wavelet packet decomposition no it can be seen from the figure that the wavelet coefficients at the a30 and a31 deco tion nodes contain a larger useful signal component, and the other decompositio

Figure 5 .
Figure 5. Spectrogram of the simulated ultrasonic signal.

Figure 6 .
Figure 6.Wavelet packet decomposition feature map of simulated signal 1.

Figure 6 .
Figure 6.Wavelet packet decomposition feature map of simulated signal 1.

Figure 7 .
Figure 7.Comparison of the signal filtering effect: (a) Signal denoising and reconstruction with a hard threshold function; (b) Signal denoising and reconstruction with a soft threshold function; (c) Signal denoising and reconstruction with a semi-soft threshold function; (d) Filtering effect with a band-pass filter.

Figure 7 .
Figure 7.Comparison of the signal filtering effect: (a) Signal denoising and reconstruction with a hard threshold function; (b) Signal denoising and reconstruction with a soft threshold function; (c) Signal denoising and reconstruction with a semi-soft threshold function; (d) Filtering effect with a band-pass filter.

Figure 8 .
Figure 8.Time delay estimation of PHAT-β generalized correlation with different β values.

Figure 10 .
Figure 10.Test platform for patrol micro-robot three-dimensional spatial localization.

Figure 12 .
Figure 12.Physical diagram of an ultrasonic localization transducer array.

Figure 12 .
Figure 12.Physical diagram of an ultrasonic localization transducer array.

Figure 13 .
Figure 13.Ultrasonic signal waveform collected by the transducer unit.

Figure 13 .
Figure 13.Ultrasonic signal waveform collected by the transducer unit.

Figure 15 .
Figure 15.Reconstructed waveform with wavelet packet denoising.After the wavelet denoising, the signal-to-noise ratio of the ultrasonic signal is significantly improved, which is beneficial to the calculation of time delay (TDE).The ultrasonic signals of sensor No. 2, sensor No. 3, sensor No. 4, and sensor No. 5 were denoised and reconstructed using the basic cross correlation and generalized cross correlation algorithms, respectively, and the TDE was calculated and compared with the signal of sensor No. 1, respectively.The obtained TDE results are shown in the following figures.As can be seen in Figure16, there are multiple peaks in the curves obtained using the basic cross correlation (BCC) algorithm, and the magnitudes of the maximum peaks are close to each other, as shown in the left panels of Figure16a,b,d.Such peaks of similar magnitudes will increase the error of the time delay estimation to some extent.Compared with the results of the basic correlation, the GCC used in the paper has the effect of sharpening the peaks, and the peaks of the curves obtained are more obvious; thus, the delay estimates can be obtained more accurately.

Table 1 .
Comparison table of signal denoising effect evaluation.

Table 2 .
Localization Results for Position 1.

Table 3 .
Localization Results for Position 2.

Table 4 .
Localization Results for Position 3.